coordinates_for_segment: add optional parent_element…#492
Draft
bertsky wants to merge 1 commit intoOCR-D:masterfrom
Draft
coordinates_for_segment: add optional parent_element…#492bertsky wants to merge 1 commit intoOCR-D:masterfrom
bertsky wants to merge 1 commit intoOCR-D:masterfrom
Conversation
…to ensure that the given polygon is fully contained within that parent's polygon.
Codecov Report
@@ Coverage Diff @@
## master #492 +/- ##
==========================================
- Coverage 80.12% 79.03% -1.10%
==========================================
Files 40 40
Lines 2390 2485 +95
Branches 443 482 +39
==========================================
+ Hits 1915 1964 +49
- Misses 403 433 +30
- Partials 72 88 +16
Continue to review full report at Codecov.
|
kba
approved these changes
May 27, 2020
| interp = childp.intersection(parentp) | ||
| if interp.is_empty: | ||
| # FIXME: we need a better strategy against this | ||
| raise Exception("intersection of would-be segment with parent is empty") |
Member
There was a problem hiding this comment.
Do we want to be robust against such blatant errors?
Collaborator
Author
There was a problem hiding this comment.
Yes, probably just show a warning. But we have no context for localizing the message at that point...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…to ensure that the given polygon is fully contained
within that parent's polygon.
Fixes #489.
But please don't merge yet, I have another, better idea